FROM debian:buster-slim

RUN echo "deb http://mirrors.163.com/debian/ buster main contrib non-free" > /etc/apt/sources.list  && \
    echo "deb-src http://mirrors.163.com/debian/ buster main contrib non-free" >> /etc/apt/sources.list  && \
    echo "deb http://mirrors.163.com/debian/ buster-updates main contrib non-free" >> /etc/apt/sources.list  && \
    echo "deb-src http://mirrors.163.com/debian/ buster-updates main contrib non-free" >> /etc/apt/sources.list  && \
    echo "deb http://mirrors.163.com/debian/ buster-backports main contrib non-free" >> /etc/apt/sources.list  && \
    echo "deb-src http://mirrors.163.com/debian/ buster-backports main contrib non-free" >> /etc/apt/sources.list  && \
    echo "deb http://mirrors.163.com/debian-security buster/updates main contrib non-free" >> /etc/apt/sources.list  && \
    echo "deb-src http://mirrors.163.com/debian-security buster/updates main contrib non-free" >> /etc/apt/sources.list

RUN  apt-get update \
    && apt-get install -y git \
    make \
    autoconf \ 
    gcc  \
    && git clone https://gitee.com/wcht/skynet_cjson.git \
    && cd skynet_cjson && bash ./up.sh && make BIN_PATH=/server/bin \
    && cd .. \
    && rm -rf skynet_cjson \
    && apt-get remove -y gcc \
    git \
    autoconf \
    make 

WORKDIR /server